﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
using Chowpoo.Sql;

namespace CourseSystem.Core.Entities
{
    [Table(Name = "Forums")]
    public class ForumsInfo:IDetach
    {
        public ForumsInfo()
        {
            Detach();
        }
        #region Model
        private int _id;
        private string _name = "";
        private int _type = 0;
        private int _displayorder = 0;
        private int _topiccount = 0;
        private int _todaytopiccount = 0;
        private int _postcount = 0;
        private int _todaypostcount = 0;
        private int _lastpostertype = 0;
        private int _lastposterid = 0;
        private string _lastpostername = "";
        private int _status = 0;
        private DateTime _lastposttime = Convert.ToDateTime("1900-1-1");
        /// <summary>
        /// 
        /// </summary>
        [Column(IsDbGenerated = true, IsPrimaryKey = true, IsVersion = true)]
        public int Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        [DisplayName("主题")]
        [Required(ErrorMessage="必须填写")]
        public string Name
        {
            set { _name = value; }
            get { return _name; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int Type
        {
            set { _type = value; }
            get { return _type; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int DisplayOrder
        {
            set { _displayorder = value; }
            get { return _displayorder; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int TopicCount
        {
            set { _topiccount = value; }
            get { return _topiccount; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int TodayTopicCount
        {
            set { _todaytopiccount = value; }
            get { return _todaytopiccount; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int PostCount
        {
            set { _postcount = value; }
            get { return _postcount; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int TodayPostCount
        {
            set { _todaypostcount = value; }
            get { return _todaypostcount; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int LastPosterType
        {
            set { _lastpostertype = value; }
            get { return _lastpostertype; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int LastPosterId
        {
            set { _lastposterid = value; }
            get { return _lastposterid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string LastPosterName
        {
            set { _lastpostername = value; }
            get { return _lastpostername; }
        }
        /// <summary>
        /// 0正常1不显示
        /// </summary>
        [Column]
        public int Status
        {
            set { _status = value; }
            get { return _status; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public DateTime LastPostTime
        {
            set { _lastposttime = value; }
            get { return _lastposttime; }
        }
        #endregion Model

        public void Detach()
        {
            
        }
    }
}
